<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">
<ui:decorate template="/WEB-INF/template/template.xhtml">

	<ui:define name="title">
		<h:outputText value="#{msgs.Identificacao}" />
	</ui:define>

	<ui:define name="conteudo">

		<p:panel header="#{msgs.cadastroDePesquisadores}">
			<h:form id="research">
				<p:growl id="growl" sticky="false" showDetail="true" />
				<h:panelGrid columns="2">

					<h:outputText value="#{msgs.researcherName}" />
					<p:inputText value="#{researcherMB.researcher.name}" required="true" requiredMessage="#{msgs.reqNome}" />

					<h:outputText value="#{msgs.researcherPhone}" />
					<p:inputText value="#{researcherMB.researcher.phone}" required="true" requiredMessage="#{msgs.reqTel}" />

					<h:outputText value="#{msgs.researcherEmail}" />
					<p:inputText id="inEmail" value="#{researcherMB.researcher.email}" required="true" requiredMessage="#{msgs.invalidEmail}" style="width:280px;" validatorMessage="#{msgs.invalidEmail}" >
						<f:validateRegex pattern="(^[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$)" />
					</p:inputText>

					<p:commandButton value="#{msgs.salvar}" action="#{researcherMB.salvar}" process="research" ajax="false" />

				</h:panelGrid>
			</h:form>
		</p:panel>

	</ui:define>

</ui:decorate>
</html>